﻿namespace demo07_null类型
{
    internal class Program
    {
        public static int? a;
        public static bool b;
        public static char c;
        public static string s;
        public static double d;

        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            Console.WriteLine(a);
            Console.WriteLine(b);
            Console.WriteLine(c);
            Console.WriteLine(s);
            Console.WriteLine(d);

            //c = null;
            //char不可为空类型
            s = null;
            Console.WriteLine(s);
            a = null; //int后面+?变成可空类型
            Console.WriteLine(a);

        }
    }
}
